Welcome To
Control
Statements


Control Statement In Python

So far we seen python programs right which as some statements and conditions to be executed the program. The Control statements is used to control the flow of execution . In which computer can order to execute the statements . the python execute the statement in order , as Example in the below

Examples

Print("This is darshan")
print("How may i help you")
print("Iam a web developer")

In above example the python Execute the statements in sequential order output:-
This is darshan
How may i help you
Iam web developer

Types

There are three types of control flow statements in python

Decision Making Control flow statements

The in which computer can take decision then which statement is execute first , based on certain conditions

The Decision Making statements is also called selection, branching statements

Decision statements

  1. Simple if statement
  2. If else statement
  3. If elif else (if ladder if statements)
  4. Nested if statements

Looping Control Flow statements

The python having the loop statement which execute the group of statements relatively until the loop condition satisfied.

The Loop statements is also called Iteration statements . repetitive process

Loops

  1. For Loop
  2. While Loop

Jump Flow Control Statements

The Jump Control flow statement is used to jump the control from on statement to another statement by using break and continue statements

Jump Statements

  1. Break statement
  2. Continue Statement